home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / March 96 / FW_CDragCommand--BeginDrag < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  1.0 KB  |  [TEXT/ttxt]

  1. Subject:     FW_CDragCommand--BeginDrag 
  2. Sent:        3/6/96 2:23 PM
  3. Received:    3/6/96 2:31 PM
  4. From:        Kirk Swenson, kswenson@mail.keypress.com
  5. Reply-To:    ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. After implementing my undoable CDropCommand subclass, I can successfully
  9. undo/redo a Drag-Move within my part.  I am only allowed one level of undo,
  10. however.  In looking through the code, FW_CDragCommand::BeginDrag calls
  11. undo->MarkActionHistory(ev), with the comment "// in case operation fails and
  12. we need to roll back transactions."  My reading of the OpenDoc Programmer's
  13. Guide suggests that marking is used for creating temporary subhistories,
  14. while rolling back a multistage transaction is accomplished without marking
  15. by calling AbortCurrentTransaction.  This additional mark would be sufficient
  16. to prevent multiple levels of undo.  Is this a bug in
  17. FW_CDragCommand::BeginDrag, or am I missing something?
  18.  
  19. Kirk Swenson
  20. Senior Software Engineer
  21. Key Curriculum Press
  22. kswenson@keypress.com
  23.  
  24.